sending NULL (probably 0) to lpData will delete the file named at lpName.
Tips & Tricks:
Please add some!
You can also send a byte[] to lpData with the content of the resource (with byte[] instead of IntPtr as the type for lpData), but I'm not sure how safe this is.
Sample Code:
Please add some!
Alternative Managed API:
Do you know one? Please contribute it!
The UpdateResource API
4/22/2016 2:31:29 PM - -83.226.86.117
The BeginUpdateResource API
9/30/2009 7:03:44 AM - tsahi-217.132.117.209
The EndUpdateResource API
4/7/2014 3:36:05 PM - -96.23.108.52
An IntPtr is a pointer to a memory location (unmanaged) that adapts to the platform it is running on (64-bit, etc.) UNLIKE a standard int/Integer. You should always use this type for unmanaged calls that require it, even though an int will appear to work on your development machine.